﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using VLUSM_BusinessLogic.DataTransferObjects;
using VLUSM_BusinessLogic;
using Microsoft.Practices.Unity;
using System.Collections.ObjectModel;

namespace VLUSM_Service
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "PortfolioService" in code, svc and config file together.
    public class PortfolioService : IPortfolioService
    {
        IUnityContainer container;
        PortfolioManager manager;

        public PortfolioService()
        {
            container = new UnityContainer();
            manager = container.Resolve<PortfolioManager>();
        }

        #region LoaiHoSo Methods
        public ObservableCollection<LoaiHoSoDTO> GetLoaiHoSoList()
        {
            return manager.GetLoaiHoSoList();
        }

        public ObservableCollection<LoaiHoSoDTO> GetLoaiHoSoByDonViID(int DonViIDFilter)
        {
            return manager.GetLoaiHoSoByDonViID(DonViIDFilter);
        }

        public ObservableCollection<LoaiHoSoDTO> GetLoaiHoSoByNotYetDonViID(int DonViIDFilter)
        {
            return manager.GetLoaiHoSoByNotYetDonViID(DonViIDFilter);
        }

        public LoaiHoSoDTO GetLoaiHoSoByID(int IDFilter)
        {
            return manager.GetLoaiHoSoByID(IDFilter);
        }

        public LoaiHoSoDTO GetLoaiHoSoByTen(string TenFilter)
        {
            return manager.GetLoaiHoSoByTen(TenFilter);
        }

        public void SaveLoaiHoSo(LoaiHoSoDTO objdto)
        {
            manager.SaveLoaiHoSo(objdto);
        }

        public void SaveLoaiHoSoList(ObservableCollection<LoaiHoSoDTO> dtolist)
        {
            manager.SaveLoaiHoSoList(dtolist);
        }

        public void RemoveLoaiHoSo(LoaiHoSoDTO objdto)
        {
            manager.RemoveLoaiHoSo(objdto);
        }

        public void RemoveLoaiHoSo(int IDFilter)
        {
            manager.RemoveLoaiHoSoByID(IDFilter);
        }

        public void SetLoaiHoSoForDonVi(int DonViID, int LoaiHoSoID)
        {
            manager.SetLoaiHoSoForDonVi(DonViID, LoaiHoSoID);
        }

        public void SetLoaiHoSoListForDonVi(int DonViID, ObservableCollection<LoaiHoSoDTO> listDTO)
        {
            manager.SetLoaiHoSoListForDonVi(DonViID, listDTO);
        }

        public void UnsetLoaiHoSoForDonVi(int DonViID, int LoaiHoSoID)
        {
            manager.UnsetLoaiHoSoForDonVi(DonViID, LoaiHoSoID);
        }

        public void UnSetLoaiHoSoListForDonVi(int DonViID, ObservableCollection<LoaiHoSoDTO> listDTO)
        {
            manager.UnSetLoaiHoSoListForDonVi(DonViID, listDTO);
        }
        #endregion

        #region PhienBanGiao Services
        public ObservableCollection<PhienBanGiaoDTO> GetPhienBanGiaoList()
        {
            return manager.GetPhienBanGiaoList();
        }

        public PhienBanGiaoDTO GetPhienBanGiaoByID(int IDFilter)
        {
            return manager.GetPhienBanGiaoByID(IDFilter);
        }

        public PhienBanGiaoDTO GetPhienBanGiaoByTen(string TenFilter)
        {
            return manager.GetPhienBanGiaoByTen(TenFilter);
        }

        public ObservableCollection<PhienBanGiaoDTO> GetPhienBanGiaoByDonViID(int DonViIDFIlter)
        {
            return manager.GetPhienBanGiaoByDonViID(DonViIDFIlter);
        }

        public void SavePhienBanGiao(PhienBanGiaoDTO objdto)
        {
            manager.SavePhienBanGiao(objdto);
        }

        public void SavePhienBanGiaoList(ObservableCollection<PhienBanGiaoDTO> dtolist)
        {
            manager.SavePhienBanGiaoList(dtolist);
        }

        public void RemovePhienBanGiao(PhienBanGiaoDTO objdto)
        {
            manager.RemovePhienBanGiao(objdto);
        }

        public void RemovePhienBanGiao(int IDFilter)
        {
            manager.RemovePhienBanGiaoByID(IDFilter);
        }
        #endregion

        #region HoSoDaNop
        public ObservableCollection<HoSoDaNopDTO> GetHoSoDaNopList()
        {
            return manager.GetHoSoDaNopList();
        }

        public ObservableCollection<HoSoDaNopDTO> GetHoSoDaNopBySinhVienID(int SinhVienIDFilter)
        {
            return manager.GetHoSoDaNopBySinhVienID(SinhVienIDFilter);
        }

        public ObservableCollection<HoSoDaNopDTO> GetHoSoDaNopByLoaiHoSoID(int LoaiHoSoIDFilter)
        {
            return manager.GetHoSoDaNopByLoaiHoSoID(LoaiHoSoIDFilter);
        }
            

        public HoSoDaNopDTO GetHoSoDaNopByID(int IDFilter)
        {
            return manager.GetHoSoDaNopByID(IDFilter);
        }

        public void SaveHoSoDaNop(HoSoDaNopDTO objdto)
        {
            manager.SaveHoSoDaNop(objdto);
        }

        public void SaveHoSoDaNopList(ObservableCollection<HoSoDaNopDTO> dtolist)
        {
            manager.SaveHoSoDaNopList(dtolist);
        }

        public void RemoveHoSoDaNop(HoSoDaNopDTO objdto)
        {
            manager.RemoveHoSoDaNop(objdto);
        }

        public void RemoveHoSoDaNop(int IDFilter)
        {
            manager.RemoveHoSoDaNopByID(IDFilter);
        }
        #endregion
    }
}
